﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Add.aspx.cs" Inherits="健康码管理系统.Add" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table>
                <tr>
                    <td>姓名:</td>
                    <td>
                        <asp:TextBox ID="txtName" runat="server"></asp:TextBox></td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="姓名不能为空" ControlToValidate="txtName"></asp:RequiredFieldValidator>

                </tr>
                  <tr>
                      <td>性别:</td>
                      <td>
                          <asp:RadioButtonList ID="txtSex" runat="server" RepeatDirection="Horizontal"> 
                              <asp:ListItem Value="0">男</asp:ListItem>
                              <asp:ListItem Value="1">女</asp:ListItem>
                          </asp:RadioButtonList></td>

                  </tr>
                  <tr>
                          <td>身份证号码:</td>
                          <td>
                              <asp:TextBox ID="txtId" runat="server"></asp:TextBox></td>
                       <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="身份证号不能为空" ControlToValidate="txtId"></asp:RequiredFieldValidator>
                      </tr>
                  <tr>
                          <td>手机号码:</td>
                          <td>
                              <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox></td>
                       <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="手机号不能为空" ControlToValidate="txtPhone"></asp:RequiredFieldValidator>
                      </tr>
                  <tr>
                          <td>年龄:</td>
                          <td>
                              <asp:TextBox ID="txtAge" runat="server"></asp:TextBox></td>

                      </tr>
                  <tr>
                          <td>健康码状态:</td>
                          <td>
                              <asp:DropDownList ID="txtJiankang" runat="server" DataSourceID="SqlDataSource2" DataTextField="Name" DataValueField="CId"></asp:DropDownList>
                              <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="Data Source=BEAKHYUN;Initial Catalog=Test2;User ID=sa;Password=123456;" ProviderName="<%$ ConnectionStrings:Test2ConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [Codetype]"></asp:SqlDataSource>
                              <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=BEAKHYUN;Initial Catalog=Test2;User ID=sa;Password=123456;" SelectCommand="SELECT * FROM [HouseType]"></asp:SqlDataSource>
                          </td>

                      </tr>
                  <tr>
                              <td>是否上报:</td>
                              <td>
                                  <asp:RadioButtonList ID="txtUp" runat="server" RepeatDirection="Horizontal">
                                      <asp:ListItem Value="1">已上报</asp:ListItem>
                                      <asp:ListItem Value="0">未上报</asp:ListItem>
                                  </asp:RadioButtonList></td>

                          </tr>
                  <tr>
                          <td></td>
                          <td>
                              <asp:Button ID="Button1" runat="server" Text="添加" OnClick="Button1_Click" /></td>

                      </tr>
            </table>
        </div>
    </form>
</body>
</html>
